gtk4.git
10 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 25 Aug 2015 09:07:47 +0000 (11:07 +0200)]
Updated Spanish translation

10 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 25 Aug 2015 09:07:23 +0000 (11:07 +0200)]
Updated Spanish translation

10 years agoUpdated Portuguese translation
Pedro Albuquerque [Tue, 25 Aug 2015 06:13:59 +0000 (06:13 +0000)]
Updated Portuguese translation

10 years agoUpdated Portuguese translation
Pedro Albuquerque [Tue, 25 Aug 2015 06:10:53 +0000 (06:10 +0000)]
Updated Portuguese translation

10 years agogtk-demo: Update listbox example with longer list
Benjamin Otte [Mon, 24 Aug 2015 19:23:49 +0000 (21:23 +0200)]
gtk-demo: Update listbox example with longer list

Add all 388 tweets of the @GTKtoolkit account. This shows the
performance behavior of the listbox (not good with that many rows) and
allows us to quickly notice when things get worse (or better).

And just so I have a place where I can dump how I generated this file:

First, I got Timm Bäder to download me the json for the twitter feed
into a file gtk.json, then I ran the jq tool on it like this:

jq ".[] | if .retweeted_status then .retweeted_status.user.name + \"|\"
+ .retweeted_status.user.screen_name else .user.name + \"|\" +
.user.screen_name end + \"|\" + .text" gtk.json | cat -n | sed
"s/\\s*\([0-9]*\)\t\"\(.*\)\"/\\1|\\2/" > messages.start

jq ".[] | .created_at" gtk.json | sed "s/\"\(.*\)\"/\1/" | while read
in; do date +%s -d "$in"; done > dates

jq ".[] | \"0|\" + if .retweeted_status then .user.screen_name else \"\"
end + \"|\" + (.favorite_count | tostring) + \"|\" + (.retweet_count |
tostring)" gtk.json | sed "s/\"\(.*\)\"/\\1/" > messages.end

paste -d\| messages.start dates messages.end > messages.txt

This whole machinery of going through 3 intermediate files was only
necessary to onvert the dates from ISO format to unix timestamps,
otherwise this could have been a single line.

10 years agogtk-demo: Order tweets newest first in listbox example
Benjamin Otte [Mon, 24 Aug 2015 19:23:29 +0000 (21:23 +0200)]
gtk-demo: Order tweets newest first in listbox example

10 years agoUpdated Slovak translation
Dušan Kazik [Mon, 24 Aug 2015 16:30:15 +0000 (16:30 +0000)]
Updated Slovak translation

10 years agoUpdated Slovak translation
Dušan Kazik [Mon, 24 Aug 2015 16:08:34 +0000 (16:08 +0000)]
Updated Slovak translation

10 years agofilechooser: check if we can access the parent folder
Paolo Borelli [Sat, 22 Aug 2015 16:20:17 +0000 (18:20 +0200)]
filechooser: check if we can access the parent folder

If we manually enter an unaccessible path in the entry, e.g
"/root/foo.txt", we should receive an error saying that the
folder is not accessible instead of showing the replace
confirmation dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=753969

10 years agoRevert "gtkoverlay: Optimize size allocations"
Matthias Clasen [Sat, 22 Aug 2015 15:22:27 +0000 (11:22 -0400)]
Revert "gtkoverlay: Optimize size allocations"

This reverts commit 93171cf4f346c0a5e71f274d012c3cacfe3880ba.

This broke overlay controls in page 3 of widget-factory, gnome-photos,
gnome-documents, etc.

10 years agolist box: Make focusable headers possible
Matthias Clasen [Sat, 22 Aug 2015 00:51:03 +0000 (20:51 -0400)]
list box: Make focusable headers possible

Previously we were assuming that only list box rows could occur
as focus children of a list box, and would crash if that wasn't
the case. This commit handles this case, and integrates focusable
headers into directional keynav and the focus chain.

The typical case of using separators as headers is not affected
by this change.

https://bugzilla.gnome.org/show_bug.cgi?id=753694

10 years agoGtkOverlay: Update the description
Matthias Clasen [Fri, 21 Aug 2015 22:19:26 +0000 (18:19 -0400)]
GtkOverlay: Update the description

State that the overlays are placed wrt to the GtkOverlay, not
with respect to the main widget. This makes a difference for
small main widgets which are not configured to fill the entire
GtkOverlay.

10 years agoRevert "popover: Optimize the transition"
Matthias Clasen [Fri, 21 Aug 2015 22:08:30 +0000 (18:08 -0400)]
Revert "popover: Optimize the transition"

This reverts commit 84bd32a09a25bee24ae7740e30bd75727695d744.

It turned out that this did break the transition in some places.

10 years agogtkplacesview: bail out if operation cancelled
Carlos Soriano [Fri, 21 Aug 2015 17:57:07 +0000 (19:57 +0200)]
gtkplacesview: bail out if operation cancelled

When an operation is cancelled it's never safe to access
the object itself or the private struct, since it could be
called (and probably is) during finalize.

In case the operation is cancelled, just bail out to fix
the crashes.

10 years agoUpload Catalan translator
Jordi Mas [Fri, 21 Aug 2015 16:21:06 +0000 (18:21 +0200)]
Upload Catalan translator

10 years agogtkplacessidebar: order mounts by label
Carlos Soriano [Fri, 21 Aug 2015 13:00:07 +0000 (15:00 +0200)]
gtkplacessidebar: order mounts by label

We were not ordering them at all, and therefore they were
jumping around

https://bugzilla.gnome.org/show_bug.cgi?id=753925

10 years agogtkplacesview: use g_utf8_collate for sorting
Carlos Soriano [Fri, 21 Aug 2015 12:49:11 +0000 (14:49 +0200)]
gtkplacesview: use g_utf8_collate for sorting

Also rename the variable, since we usually use location
for GFiles variables.

10 years agogtkplacesview: add a loading property
Carlos Soriano [Wed, 19 Aug 2015 12:46:34 +0000 (14:46 +0200)]
gtkplacesview: add a loading property

So clients of the view can know if the view is busy.

https://bugzilla.gnome.org/show_bug.cgi?id=753786

10 years agogtkplacesview: improve networks feedback
Carlos Soriano [Tue, 18 Aug 2015 21:26:07 +0000 (23:26 +0200)]
gtkplacesview: improve networks feedback

Add a spinner when networks are being fetched and make
the network section permanent and show a placeholder with
a message that no networks were found in case there are no
networks. In this way users from previous versions won't be
confused with the fact that no networks are shown.

https://bugzilla.gnome.org/show_bug.cgi?id=753786

10 years agogtkplacesview: add networks in network:///
Carlos Soriano [Tue, 18 Aug 2015 15:58:41 +0000 (17:58 +0200)]
gtkplacesview: add networks in network:///

Previously we had a network item in the sidebar, which now
is replaced by the network section on other-locations view.
However we were not exposing the networks in network:///.

Fetch them and add them in the network section of other-locations
view.

https://bugzilla.gnome.org/show_bug.cgi?id=753786

10 years agogtkplacesview: style fix
Carlos Soriano [Tue, 18 Aug 2015 07:43:48 +0000 (09:43 +0200)]
gtkplacesview: style fix

https://bugzilla.gnome.org/show_bug.cgi?id=753786

10 years agoUpdated Slovak translation
Dušan Kazik [Fri, 21 Aug 2015 08:55:24 +0000 (08:55 +0000)]
Updated Slovak translation

10 years agowayland: Only bind supported unstable pointer gestures global
Jonas Ådahl [Thu, 20 Aug 2015 03:38:43 +0000 (11:38 +0800)]
wayland: Only bind supported unstable pointer gestures global

As the protocol is still considered unstable (meaning not backward
compatible), we should, as stated in the protocol, only bind the version
advertised is the version we implement.

https://bugzilla.gnome.org/show_bug.cgi?id=753856

10 years agooverlay: Always align widgets relative to the overlay
Benjamin Otte [Thu, 20 Aug 2015 22:46:35 +0000 (00:46 +0200)]
overlay: Always align widgets relative to the overlay

... not to the contained widget, which might not occupy the whole
overlay when an align mode is set.

10 years agooverlay: Use actual size of the overlay when positioning
Benjamin Otte [Thu, 20 Aug 2015 22:44:17 +0000 (00:44 +0200)]
overlay: Use actual size of the overlay when positioning

Previously we were using the natural requested size which is unrelated.

10 years agoUpdated Lithuanian translation
Aurimas Černius [Thu, 20 Aug 2015 20:01:41 +0000 (23:01 +0300)]
Updated Lithuanian translation

10 years agotreeview: check for pixel cache before setting property
Christian Hergert [Thu, 20 Aug 2015 18:13:30 +0000 (11:13 -0700)]
treeview: check for pixel cache before setting property

Code exists in the wild that calls this function after the widget has
been destroyed (and the pixel cache released). Simply check that the
pixel cache exists to preserve the existing state.

10 years agoUpdate Catalan translation
Jordi Mas [Thu, 20 Aug 2015 17:04:10 +0000 (19:04 +0200)]
Update Catalan translation

10 years agoimmodule: Remove unused parameter
Benjamin Otte [Tue, 18 Aug 2015 18:45:34 +0000 (20:45 +0200)]
immodule: Remove unused parameter

10 years agoUpdated POTFILES.skip
Piotr Drąg [Thu, 20 Aug 2015 11:01:14 +0000 (13:01 +0200)]
Updated POTFILES.skip

10 years agogtk-demo: Add a model button demo
Matthias Clasen [Thu, 20 Aug 2015 03:17:01 +0000 (23:17 -0400)]
gtk-demo: Add a model button demo

This shows how to hook model buttons up to various action types,
or how to create them manually.

10 years agoGtkTextView: fix margin/padding scroll behaviour
Sebastien Lafargue [Wed, 19 Aug 2015 10:33:06 +0000 (12:33 +0200)]
GtkTextView: fix margin/padding scroll behaviour

When you move line by line, only padding is
automaticly shown and you need to use Page key to show margin.

This commit also fix cursor going out of the screen bug.

10 years agogdkevent: Hold refs to device/source_device
Carlos Garnacho [Mon, 3 Aug 2015 15:22:29 +0000 (17:22 +0200)]
gdkevent: Hold refs to device/source_device

The extra reference will be held from GdkEventPrivate data, so there's
a common place to all events. Without this, events queued after devices/
capabilities disappear (eg. on TTY switch) might hold invalid pointers.
Windowing level operations on those devices (queries, grabs...) are
expected to fail at that time, but we should hold meaningful data for
the regular event handling paths.

https://bugzilla.gnome.org/show_bug.cgi?id=753185

10 years agogtkscrolledwindow: Fold kinetic deceleration handling into scroll_event()
Carlos Garnacho [Wed, 19 Aug 2015 16:45:50 +0000 (18:45 +0200)]
gtkscrolledwindow: Fold kinetic deceleration handling into scroll_event()

In order to play along with child widgets that use scroll events for anything
else than scrolling, it will be better to do this in the bubble phase, so
the child widget has an opportunity to GDK_EVENT_STOP the event before we
trigger kinetic scrolling.

This of course won't work for widgets that choose to reimplement scroll event
handling themselves, they should be smart at resorting to GtkScrolledWindow's
scroll event handling.

This fixes kinetic scrolling kicking in too pervasively on widgets that eg.
implement zoom on scroll events.

https://bugzilla.gnome.org/show_bug.cgi?id=753495

10 years agoUpdated Hungarian translation
Gábor Kelemen [Wed, 19 Aug 2015 10:07:21 +0000 (10:07 +0000)]
Updated Hungarian translation

10 years agoplacessidebar: set Other Locations uri
Georges Basile Stavracas Neto [Tue, 18 Aug 2015 22:34:21 +0000 (19:34 -0300)]
placessidebar: set Other Locations uri

By assigning an URI to Other Locations item, we
can programaticaly select it. Fixes a bug in Nautilus,
where the Other Locations item is unselected imediately
after being clicked.

10 years agomultipress: Only emit preedit signals if needed
Matthias Clasen [Tue, 18 Aug 2015 19:42:56 +0000 (15:42 -0400)]
multipress: Only emit preedit signals if needed

When clearing the compose buffer, don't emit preedit-changed
unconditionally. This triggers a recursion which leads to
a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=753644

10 years agoprint operation: let subclasses use a custom paginate
Paolo Borelli [Mon, 17 Aug 2015 16:31:15 +0000 (18:31 +0200)]
print operation: let subclasses use a custom paginate

GtkPrintOperation was emitting paginate only if a signal was
connected, this meant that subclassing and overriding the
paginate vfunc lead to the unexpected result that paginate did
not run.
Instead we always emit the signal and use a custom accumulator:
if there is a signal we just run that and avoid the default
handler, otherwise we run the default handler which can be the
one by the subclass or the default handler that just skips
pagination.

Patch by Yevgen Muntyan, fixes #345345

10 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 18 Aug 2015 11:56:26 +0000 (13:56 +0200)]
Updated Spanish translation

10 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 18 Aug 2015 11:56:16 +0000 (13:56 +0200)]
Updated Spanish translation

10 years ago3.17.7
Matthias Clasen [Tue, 18 Aug 2015 02:09:03 +0000 (22:09 -0400)]
3.17.7

10 years agowayland: Use g_get_prgname() to get the xdg_surface.set_app_id string
Jonas Ådahl [Tue, 18 Aug 2015 00:38:07 +0000 (08:38 +0800)]
wayland: Use g_get_prgname() to get the xdg_surface.set_app_id string

Prior to this patch, the ID of the GtkApplication was always used for
clients which were GtkApplications. This would only be guaranteed to be
correct for D-Bus activatable programs. As a result, all
non-D-Bus-activatable applications would set the wrong ID making the
shell unable to find the corresponding .desktop file.

This change makes it so that the GDK backend always uses the name
passed to g_set_prgname, or the default value if not explicitly set, as
this more often corresponds to the .desktop file.

This means that in order to make D-Bus activatable applications set the
correct application ID, they must, for now, manually call
g_set_prgname() with their application ID (basename of the .desktop
file).

If g_get_prgname() returns NULL, fallback to gdk_get_program_class()
even though it will most likely never be correct according to the
xdg_surface.set_app_id specification.

https://bugzilla.gnome.org/show_bug.cgi?id=746435

10 years agogtkplacesview: allow to cancel connection to server
Carlos Soriano [Mon, 17 Aug 2015 22:42:23 +0000 (00:42 +0200)]
gtkplacesview: allow to cancel connection to server

We were not allowing to cancel the operation at all, and at
most the operation was cancelled only when clicked connect again.

Also due to gvfs bug 753735 we actually weren't cancelling
at all, and therefore creating multiple dialogs.

10 years agoplaces-view: show a more verbose entry hint
Georges Basile Stavracas Neto [Mon, 17 Aug 2015 17:25:18 +0000 (14:25 -0300)]
places-view: show a more verbose entry hint

As pointed out by Allan, this is not very helpful. A
call to action label fits better in this case.

10 years agoflowbox: Sink the floating reference of model-based children
Emmanuele Bassi [Mon, 17 Aug 2015 12:32:35 +0000 (13:32 +0100)]
flowbox: Sink the floating reference of model-based children

We don't want to leak references if the widget created to represent the
item in the model does not have a floating reference — which is usually
what happens in bindings, as they automatically sink references when
creating new instances.

See commit 6e03e7e8 for the similar change in GtkListBox.

10 years agoMSVC Introspection Builds: Remove GCC Requirement
Chun-wei Fan [Mon, 17 Aug 2015 11:20:04 +0000 (19:20 +0800)]
MSVC Introspection Builds: Remove GCC Requirement

Sorry, the last commit added a generated file instead of the
template.

G-I has been updated to not require a Windows GCC installation
anymore to generate the .gir files, so update the NMake Makefiles
that are used for this purpose.

As a result, it is no longer necessary to define time_t for the .gir
generation as we are on the same compiler throughout the process.

10 years agoRevert "MSVC Introspection Builds: Remove GCC Requirement"
Chun-wei Fan [Mon, 17 Aug 2015 11:18:03 +0000 (19:18 +0800)]
Revert "MSVC Introspection Builds: Remove GCC Requirement"

This reverts commit aea7809f55ac520b9d2d5d9c1eea1345fabbd7a7.

10 years agoMSVC Introspection Builds: Remove GCC Requirement
Chun-wei Fan [Mon, 17 Aug 2015 11:11:53 +0000 (19:11 +0800)]
MSVC Introspection Builds: Remove GCC Requirement

G-I has been updated to not require a Windows GCC installation
anymore to generate the .gir files, so update the NMake Makefiles
that are used for this purpose.

As a result, it is no longer necessary to define time_t for the .gir
generation as we are on the same compiler throughout the process.

10 years agogtk-demo: Use top/bottom-margin for text views
Matthias Clasen [Mon, 17 Aug 2015 05:36:37 +0000 (01:36 -0400)]
gtk-demo: Use top/bottom-margin for text views

This lets us replace the hack of inserting tags in the first
and last paragraph to set a above/below-paragraph space.

10 years agotext view: add padding and margin
Sebastien Lafargue [Tue, 23 Dec 2014 20:30:24 +0000 (21:30 +0100)]
text view: add padding and margin

Add API to set top and bottom margins, and add the CSS padding
from the theme to the programmatically set margins.

https://bugzilla.gnome.org/show_bug.cgi?id=406159

10 years agoUpdated Galician translations
Fran Dieguez [Sun, 16 Aug 2015 23:31:09 +0000 (01:31 +0200)]
Updated Galician translations

10 years agoAdd a test for gtk_flow_box_bind_model
Matthias Clasen [Sun, 16 Aug 2015 22:20:12 +0000 (18:20 -0400)]
Add a test for gtk_flow_box_bind_model

10 years agoAdd gtk_flow_box_bind_model
Matthias Clasen [Sun, 16 Aug 2015 22:05:33 +0000 (18:05 -0400)]
Add gtk_flow_box_bind_model

10 years agoAdd a test for g_list_box_bind_model
Matthias Clasen [Sun, 16 Aug 2015 22:04:49 +0000 (18:04 -0400)]
Add a test for g_list_box_bind_model

10 years agolist box: Shorten some static function names
Matthias Clasen [Sun, 16 Aug 2015 22:11:50 +0000 (18:11 -0400)]
list box: Shorten some static function names

10 years agoBump Pango requirement to 1.37.3
Christoph Reiter [Sun, 16 Aug 2015 06:04:37 +0000 (08:04 +0200)]
Bump Pango requirement to 1.37.3

GTK+ now uses pango_attr_foreground_alpha_new, pango_attr_background_alpha_new,
PANGO_ATTR_FOREGROUND_ALPHA, PANGO_ATTR_BACKGROUND_ALPHA,
pango_renderer_set_alpha, pango_renderer_get_alpha, which were all added
after 1.37.2.

10 years agoUpdated Portuguese translation
Pedro Albuquerque [Sun, 16 Aug 2015 06:10:06 +0000 (06:10 +0000)]
Updated Portuguese translation

10 years agopopover: Don't restore stale default widget
Matthias Clasen [Sun, 16 Aug 2015 03:38:20 +0000 (23:38 -0400)]
popover: Don't restore stale default widget

Only restore the saved default widget if the default hasn't been
changed while the popover was visible.

10 years agoAdd a note to gdk_screen_get_width/height_mm
Matthias Clasen [Sun, 16 Aug 2015 02:20:16 +0000 (22:20 -0400)]
Add a note to gdk_screen_get_width/height_mm

The values returned by these functions are not very well defined,
recommend to use the monitor dimensions instead.

10 years agowayland: calculate screen physical size
Carlos Garnacho [Fri, 14 Aug 2015 10:05:37 +0000 (12:05 +0200)]
wayland: calculate screen physical size

A simple calculation is done so far (assuming monitor areas never overlap)
so gdk_screen_get_width/height_mm return meaningful values.

https://bugzilla.gnome.org/show_bug.cgi?id=753621

10 years agopopover: Optimize the transition
Matthias Clasen [Sun, 16 Aug 2015 02:02:40 +0000 (22:02 -0400)]
popover: Optimize the transition

There's no need to queue a resize here.

https://bugzilla.gnome.org/show_bug.cgi?id=753568

10 years agowindow: Set name on idle
Matthias Clasen [Sat, 15 Aug 2015 20:05:11 +0000 (16:05 -0400)]
window: Set name on idle

Use gdk_threads_add_idle, and set a name on the source to aid
debugging, as we do everywhere else.

10 years agosearc engine model: Set name on idle
Matthias Clasen [Sat, 15 Aug 2015 20:04:09 +0000 (16:04 -0400)]
searc engine model: Set name on idle

Use gdk_threads_add_idle, and set a name on the source to aid
debugging, as we do everywhere else.

10 years agoUpdate release notes a bit
Matthias Clasen [Sat, 15 Aug 2015 17:40:30 +0000 (13:40 -0400)]
Update release notes a bit

10 years agoFix a thinko in GtkLabel
Matthias Clasen [Sat, 15 Aug 2015 15:16:46 +0000 (11:16 -0400)]
Fix a thinko in GtkLabel

10 years agoSupport alpha in text cell renderer colors
Matthias Clasen [Sat, 15 Aug 2015 15:07:54 +0000 (11:07 -0400)]
Support alpha in text cell renderer colors

This is easily possible, now that Pango supports alpha.

10 years agoUpdated Slovak translation
Dušan Kazik [Sat, 15 Aug 2015 09:57:23 +0000 (09:57 +0000)]
Updated Slovak translation

10 years agoGtkLabel: Add alpha support for buildable attributes
Matthias Clasen [Wed, 12 Aug 2015 01:35:24 +0000 (21:35 -0400)]
GtkLabel: Add alpha support for buildable attributes

Make it possible to set foreground or background alpha in the
builder ui support for Pango attributes.

10 years agoGtkTextDisplay: Use pango renderer alpha support
Matthias Clasen [Wed, 12 Aug 2015 01:25:51 +0000 (21:25 -0400)]
GtkTextDisplay: Use pango renderer alpha support

We don't need to store our own copy of the colors anymore,
now that PangoRenderer can do alpha.

10 years agoUpdates
Matthias Clasen [Sat, 15 Aug 2015 01:56:51 +0000 (21:56 -0400)]
Updates

10 years agoRevert "wayland: require WAYLAND_DISPLAY be set to open wayland display"
Ray Strode [Fri, 14 Aug 2015 15:24:44 +0000 (11:24 -0400)]
Revert "wayland: require WAYLAND_DISPLAY be set to open wayland display"

This reverts commit 35489f5d31b20a390b45803d760f965391d0b57f.

It snuck in when i was trying to push

commit f4d2022d46e16e1fdec8ca9b107a9870155832bf

10 years agowayland: change wl_log level to G_LOG_LEVEL_DEBUG
Ray Strode [Fri, 14 Aug 2015 15:03:43 +0000 (11:03 -0400)]
wayland: change wl_log level to G_LOG_LEVEL_DEBUG

wl_log() currently logs using G_LOG_LEVEL_ERROR
(which is fatal). The wayland client library doesn't
expect this behavior. It uses wl_log to log recoverable
errors.

This commit changes the log level to G_LOG_LEVEL_DEBUG
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=753635

10 years agowayland: require WAYLAND_DISPLAY be set to open wayland display
Ray Strode [Fri, 14 Aug 2015 14:23:31 +0000 (10:23 -0400)]
wayland: require WAYLAND_DISPLAY be set to open wayland display

The wayland client libraries now require WAYLAND_DISPLAY be set
to use them.

See:

http://cgit.freedesktop.org/wayland/wayland/commit/?id=fb7e13021730d0a5516ecbd3712ea4235e05d24d

This commit makes _gdk_wayland_display_open bail early if
WAYLAND_DISPLAY is unset, just as it does for XDG_RUNTIME_DIR.

10 years agoGDK W32: Add missing commas
Руслан Ижбулатов [Fri, 14 Aug 2015 12:12:01 +0000 (12:12 +0000)]
GDK W32: Add missing commas

10 years agoRevert "Revert "Revert "gtkwindow: Reset maximize / fullscreen_initially on state...
Matthias Clasen [Wed, 12 Aug 2015 23:35:52 +0000 (19:35 -0400)]
Revert "Revert "Revert "gtkwindow: Reset maximize / fullscreen_initially on state changes"""

This reverts commit 8001b2c1b3b9b5535d20ec942c497ae0f0a4adc7.

10 years agoRevert "Revert "Revert "window: fix initial shadow width for maximized/fullscreen...
Matthias Clasen [Wed, 12 Aug 2015 23:35:10 +0000 (19:35 -0400)]
Revert "Revert "Revert "window: fix initial shadow width for maximized/fullscreen windows"""

This reverts commit 968ac90e89f444e180d883a28bfd260b118f451d.

10 years agoRevert "Revert "gtkwindow: Reset maximize / fullscreen_initially on state changes""
Matthias Clasen [Thu, 23 Jul 2015 03:16:44 +0000 (23:16 -0400)]
Revert "Revert "gtkwindow: Reset maximize / fullscreen_initially on state changes""

This reverts commit de2ea1ebaabd7550ca6f2a02bfbaa04ac92181fd.

No reason in the commit message was given for the revert, and we need
this for proper behavior on map.

10 years agoRevert "Revert "window: fix initial shadow width for maximized/fullscreen windows""
Jasper St. Pierre [Wed, 12 Aug 2015 21:39:46 +0000 (14:39 -0700)]
Revert "Revert "window: fix initial shadow width for maximized/fullscreen windows""

This reverts commit 8b695cc7279270eabf7d2541cfd592608d0add38.

No reason in the commit message was given for the revert, and we need
this for proper behavior on map.

10 years agowayland: Implement touchpad gesture events
Carlos Garnacho [Thu, 9 Jul 2015 17:36:30 +0000 (19:36 +0200)]
wayland: Implement touchpad gesture events

On wayland, the gestures protocol defines a wl_pointer_gestures global
object, that will match in number with wl_seats, swipe and pinch
interfaces can be obtained from it, which events are translated into
GdkEventTouchpadSwipe/Pinch events.

10 years agowayland: Add touchpad gestures protocol
Carlos Garnacho [Mon, 20 Jul 2015 15:22:33 +0000 (17:22 +0200)]
wayland: Add touchpad gestures protocol

10 years agogtkgesture: Add note to gtk_gesture_get_bounding_box()
Carlos Garnacho [Fri, 24 Jul 2015 10:59:59 +0000 (12:59 +0200)]
gtkgesture: Add note to gtk_gesture_get_bounding_box()

This is the only function that's will be semantically confusing
with touchpad gesture events, explain what's to be expected there.

10 years agogtkgesture: Add touchpad gesture event bit to the controller evmask
Carlos Garnacho [Thu, 9 Jul 2015 17:35:12 +0000 (19:35 +0200)]
gtkgesture: Add touchpad gesture event bit to the controller evmask

10 years agogtkgesturedrag: Handle touchpad swipe events
Carlos Garnacho [Fri, 24 Jul 2015 11:05:31 +0000 (13:05 +0200)]
gtkgesturedrag: Handle touchpad swipe events

These will only trigger the gesture if it's been created with
the same GtkGesture::n-points than n_fingers in the event.

10 years agogtkgestureswipe: Handle touchpad swipe events
Carlos Garnacho [Fri, 24 Jul 2015 11:03:09 +0000 (13:03 +0200)]
gtkgestureswipe: Handle touchpad swipe events

These will only trigger the gesture if it's been created with
the same GtkGesture::n-points than n_fingers in the event.

10 years agogtkgesturerotate: Handle touchpad pinch events
Carlos Garnacho [Thu, 9 Jul 2015 17:34:09 +0000 (19:34 +0200)]
gtkgesturerotate: Handle touchpad pinch events

We let these through in GtkEventController::filter, and handle
these especially on GtkGesture::update.

10 years agogtkgesturezoom: Handle touchpad pinch events
Carlos Garnacho [Thu, 9 Jul 2015 17:31:27 +0000 (19:31 +0200)]
gtkgesturezoom: Handle touchpad pinch events

We let these through in GtkEventController::filter, and handle
these especially on GtkGesture::update.

10 years agogtkgesture: Add docs blurb about touchpad gestures
Carlos Garnacho [Fri, 24 Jul 2015 16:52:38 +0000 (18:52 +0200)]
gtkgesture: Add docs blurb about touchpad gestures

Not too long though, the precautions to take are minimal.

10 years agogtkgesture: Accumulate touchpad events' dx/dy in point data
Carlos Garnacho [Fri, 24 Jul 2015 09:48:44 +0000 (11:48 +0200)]
gtkgesture: Accumulate touchpad events' dx/dy in point data

This will make the gesture "center" the pointer position, plus
the accumulated dx/dy throughout the gesture progress.

10 years agogtkgesture: Handle touchpad events
Carlos Garnacho [Thu, 9 Jul 2015 17:18:09 +0000 (19:18 +0200)]
gtkgesture: Handle touchpad events

These will be mutually exclusive with touch events, so it won't
be possible to trigger gestures through mixed input and whatnot.

The accounting of touchpad events is slightly different, there
will be a single internal PointData struct, stored in the hashtable
with the NULL event sequence/key (same than pointer events in
this regard), just that the events stored will be GdkEventTouchpad*,
so will hold information about all fingers at once.

But this difference is just internal, the GtkGesture API doesn't
make explicit assumptions about the number of points (the closest
to a per-point query API is gtk_gesture_get_sequences()). All
signals emitted just contain the last changed GdkEventSequence,
and API takes GdkEventSequences, so everything is consistent with
sequence=NULL for touchpad events.

10 years agogtkgesture: Refactor n-points querying into a single function
Carlos Garnacho [Thu, 9 Jul 2015 17:11:04 +0000 (19:11 +0200)]
gtkgesture: Refactor n-points querying into a single function

Along the code, we're basically asking for 1) the total count of
touchpoints, and 2) the number of active touchpoints (not denied
nor ended).

Wrap both usecases into a _gtk_gesture_get_n_physical_touchpoints(),
and replace all occurrences.

10 years agogtkgesture: Filter out touchpad events by default.
Carlos Garnacho [Thu, 9 Jul 2015 17:04:59 +0000 (19:04 +0200)]
gtkgesture: Filter out touchpad events by default.

The gestures that don't want touchpad gesture events are majority,
even those that want such events will only listen to subsets (eg.
pinch, swipe,...).

So it makes sense to ignore touchpad events by default, and let
subclasses opt those in.

10 years agogtkgesture: Refactor gtk_gesture_handle_event()
Carlos Garnacho [Fri, 24 Jul 2015 15:39:35 +0000 (17:39 +0200)]
gtkgesture: Refactor gtk_gesture_handle_event()

We'll be dealing with event types and touchpad gesture phases,
replace the switch by a battery of if/elses. Otherwise, it's
just an style change.

10 years agoeventcontroller: Add private ::filter method
Carlos Garnacho [Thu, 9 Jul 2015 16:55:32 +0000 (18:55 +0200)]
eventcontroller: Add private ::filter method

This will be used right before handle_event() in order to filter
out events, useful to make the previous "no touchpad events" behavior
the default, and have gesture subclasses include manually the touchpad
events they handle.

10 years agogtkwidget: Ensure touchpad events trigger the bubbling phase
Carlos Garnacho [Thu, 9 Jul 2015 16:48:41 +0000 (18:48 +0200)]
gtkwidget: Ensure touchpad events trigger the bubbling phase

For all other events, we run the bubble phase deep in the specific
::motion/button-press/release/touch handlers.

For touchpad events, it doesn't make sense to use GtkWidgetClass
slots if the intended way to deal with these are gestures, so we
run the bubble phase directly from gtk_widget_event_internal().

10 years agogtkmain: Handle rewriting of event fields during grabs for touchpad events
Carlos Garnacho [Thu, 9 Jul 2015 16:47:02 +0000 (18:47 +0200)]
gtkmain: Handle rewriting of event fields during grabs for touchpad events

The window/coordinates will need translation in the case of touchpad gesture
events, same than with other pointer events.

10 years agogdk: Proxy touchpad events through the client-side window hierarchy
Carlos Garnacho [Thu, 9 Jul 2015 16:44:09 +0000 (18:44 +0200)]
gdk: Proxy touchpad events through the client-side window hierarchy

This includes poking the deepmost window, checking for the
GDK_TOUCHPAD_GESTURE_MASK bit set, and translating coordinates in events
accordingly.

10 years agogdk: Add GDK_TOUCHPAD_GESTURE_MASK to GdkEventMask
Carlos Garnacho [Thu, 9 Jul 2015 16:42:35 +0000 (18:42 +0200)]
gdk: Add GDK_TOUCHPAD_GESTURE_MASK to GdkEventMask

Users will need to manually select on this in order to receive gesture
events.

10 years agogdk: Add touchpad gesture events and event types.
Carlos Garnacho [Thu, 9 Jul 2015 16:39:58 +0000 (18:39 +0200)]
gdk: Add touchpad gesture events and event types.

Each gesture type has its separate GdkEvent struct, and begin/update/
end/cancel event types.

There is support for multi-finger swipe (3-4 fingers), and 2-finger
rotate/pinch gestures.

10 years agocellrendererpixbuf: do not clear the icon helper twice
Paolo Borelli [Wed, 12 Aug 2015 06:12:36 +0000 (08:12 +0200)]
cellrendererpixbuf: do not clear the icon helper twice

Do not call _gtk_icon_helper_clear explicitely when the properties
are set, since the corresponding _gtk_icon_helper_set_* method
already calls clear internally.
While at it rename the reset function to make it clear that it
is calling notify for the previous image type and avoid the
notification if the image type is not changing.

10 years agocolor chooser: Reset show-editor on unmap
Matthias Clasen [Wed, 12 Aug 2015 11:22:05 +0000 (07:22 -0400)]
color chooser: Reset show-editor on unmap

We have a testcolorchooser test, with a --edit option. It was
supposed to make the color chooser come up in edit mode, but
it didn't work ever since we dropped the ::response handler.
Fix it by resetting show-editor on unmap, instead of on map.
This way, users can set show-editor before showing the dialog,
and it will take effect.